package com.ruicar.afs.cloud.manage.api.feign.info;

import com.ruicar.afs.cloud.common.core.util.IResponse;
import com.ruicar.afs.cloud.common.vo.CollectCancelVo;
import com.ruicar.afs.cloud.manage.api.dto.BasicExpenseRecordDetailDto;
import com.ruicar.afs.cloud.manage.api.dto.BasicPrintTemplateInfoDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author infinity
 * @version 1.0
 * @date 2020/7/28 14:08
 */
@FeignClient(value = "${com.ruicar.service-names.basic-server}", contextId = "basicContract")
public interface BasicMainInfoFeign {

    @ApiOperation("合同信息")
    @PostMapping(value = "/contractInfo/mainInfofindByContractNo")
    public IResponse mainInfofindByContractNo(@PathVariable(value = "contractNo") String contractNo, @RequestHeader Map<String, String> headers);

    @PostMapping("/costExempt/changeExpenseRecordStatus")
    @ApiOperation(value = "变更合同金额状态")
    IResponse changeExpenseRecordStatus(BasicExpenseRecordDetailDto detailDto, @RequestHeader Map<String, String> headers);


    @PostMapping("/costExempt/costExemptApprovel")
    @ApiOperation(value = "豁免费用流程处理")
    IResponse costExemptApprovel(BasicExpenseRecordDetailDto detailDto, @RequestHeader Map<String, String> headers);

    @PostMapping("/receiptHandle/getReceiptRecord")
    @ApiOperation(value = "获取收据信息")
    IResponse<List<CollectCancelVo>> getReceiptRecord(@RequestParam("id") Long id, @RequestHeader Map<String, String> headers);

    @ApiOperation("合同信息车辆信息")
    @PostMapping(value = "/contractInfo/basicPrintTemplateInfo")
    IResponse<BasicPrintTemplateInfoDto> basicPrintTemplateInfo(@RequestParam(value = "contractNo") String contractNo, @RequestParam(value = "carId") Long carId);

    @ApiOperation("合同信息车辆信息")
    @PostMapping(value = "/contractInfo/closeContract")
    public IResponse closeContract(@RequestParam(value = "contractNo") String contractNo);

    @PostMapping("/costExempt/getCanCostExempt")
    @ApiOperation(value = "获取可做费用豁免信息")
    IResponse getCanCostExempt(BasicExpenseRecordDetailDto detailDto, @RequestHeader Map<String, String> headers);

    @PostMapping("/basicCanaelInfo/getBasicCancelList")
    @ApiOperation(value = "合同取消校验")
    IResponse<String> cancelContractValid(@RequestParam("contractNo") String contractNo, @RequestParam("isSp") Boolean isSp);

    @PostMapping("/basicCostExemptBillInfo/penaltyExemptValid")
    @ApiOperation(value = "罚息豁免校验")
    IResponse<String> penaltyExemptValid(@RequestParam("contractNo") String contractNo);

    @GetMapping("/costExempt/CostExemptValid/{contractNo}")
    @ApiOperation(value = "费用豁免时当前合同是否在扣款中校验")
    IResponse costExemptValid(@PathVariable(value = "contractNo") String contractNo,@RequestHeader Map<String, String> headers);

}
